package com.cos.dao;

import com.cos.entity.Emp;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface EmpMapper {

     /**
      * @author: lyc
      * @time: 2021/05/12 16:24
      * @description: 查所有
      */

     List<Emp> getAll();

      /**
       * @author: lyc
       * @time: 2021/05/12 18:49
       * @description: 查询单行数据
       */
      Emp getEmpByEno(@Param("eno") int eno,@Param("name") String name);

       /**
        * @author: lyc
        * @time: 2021/05/12 19:28
        * @description: 查询行数
        */
       Long getCount();

        /**
         * @author: lyc
         * @time: 2021/05/12 19:33
         * @description:map map参数绑定
         */
        Emp getEmpByMap(Map map);
         /**
          * @author: lyc
          * @time: 2021/05/12 20:13
          * @description: 对象
          */
         Emp getEmp(Emp emp);
          /**
           * @author: lyc
           * @time: 2021/05/12 20:21
           * @description: 模糊查询
           */
          List<Emp> getEmpLike(@Param("key") String key);
           /**
            * @author: lyc
            * @time: 2021/05/12 20:39
            * @description: 删除
            */
           boolean delete( @Param("eno") int eno);
            /**
             * @author: lyc
             * @time: 2021/05/12 20:48
             * @description: 增加
             */
           boolean insert(Emp emp);
            /**
             * @author: lyc
             * @time: 2021/05/13 8:26
             * @description: 更新
             */
            boolean update(Emp emp);
}
